package com.runshu.newsmartark.mvp.model;

import com.runshu.newsmartark.common.ConstantUrl;
import com.runshu.newsmartark.entity.NewTakeStockEntity;
import com.runshu.newsmartark.entity.ProductsBean;
import com.runshu.newsmartark.mvp.contract.ProductsByCategoryContract;
import com.runshu.newsmartark.network.netbean.HttpRequestParamsBuilder;
import com.runshu.newsmartark.network.netbean.ResponseBean;
import com.runshu.newsmartark.network.netinterface.BaseCallBack;

/**
 * Demo class
 *
 * @author yu
 * @date 2020/11/3
 * @decs：
 */

public class ProductsByCategoryModel extends BaseModel implements ProductsByCategoryContract.Model {
    @Override
    public void getProDta(String macAddress, String category, String stockName, String modle, String manufacturer, int expiryDate,int type, int pageSize, int pageNum, BaseCallBack baseCallBack) {
        HttpRequestParamsBuilder builder = new HttpRequestParamsBuilder();
        builder.putParams("macAddress", macAddress);
        builder.putParams("category", category);
        builder.putParams("stockName", stockName);
        builder.putParams("model", modle);
        builder.putParams("manufacturer", manufacturer);
        builder.putParams("expiryDate", expiryDate);
        builder.putParams("type", type);
        builder.putParams("pageSize", pageSize);
        builder.putParams("pageNum", pageNum);
        super.initDataFromServer(ConstantUrl.GET_ProductsByCategory, builder.build(), NewTakeStockEntity.class, ResponseBean.RES_DATATYPE_BEAN, baseCallBack);

    }
}